package salercomputer.Disk;

import salercomputer.model.Component;
import salercomputer.myInterface.Workable;

public class Disk extends Component implements Workable {

    private int volume;

    public Disk(String name, Double price,int volume) {
        super(name, price);
        this.volume=volume;
    }

    public int getVolume() {
        return volume;
    }

    public void setVolume(int volume) {
        this.volume = volume;
    }

    @Override
    public String description() {
        StringBuilder descriptionStr = new StringBuilder();
        descriptionStr.append(super.description())
                .append("size(MB):{")
                .append(volume)
                .append("MB}");
        return descriptionStr.toString();
    }

    @Override
    public void work() {

    }
}
